﻿
@{
    ViewBag.Title = Resources.WebStringsWeb.WebTitle;
    Layout = "~/Views/Shared/_LayoutMobile.cshtml";
}

@section css {
    <link href="~/Assets/css/previewImage.css" rel="stylesheet" />
    <style>
        .mui-bar ~ .mui-content .mui-scroll-wrapper {
            top: 44px;
            height: auto;
        }

        .btn_addPic {
            display: block;
            position: relative;
            width: 53px;
            height: 53px;
            overflow: hidden;
            cursor: pointer;
            text-align: center;
        }

        .filePrew {
            display: block;
            position: absolute;
            top: 0;
            left: 0;
            width: 53px;
            height: 53px;
            opacity: 0;
        }
    </style>
}
<header class="mui-bar mui-bar-nav">
    <button type="button" class="mui-left mui-action-back mui-btn mui-btn-link mui-btn-nav mui-pull-left" style="color:white;">
        <span class="mui-icon mui-icon-left-nav" style=""></span>
    </button>
    <h1 class="mui-title" style="color:white;">问题详细</h1>
</header>

<div class="mui-content" style="margin: 5px;" ng-cloak ng-controller="HiddenTroubleController" ng-init="
     FormId='@(Request.QueryString["FormId"].IsEmpty() ? "0" : Request.QueryString["FormId"])';
     page='@(Request.QueryString["page"].IsEmpty() ? "1" : Request.QueryString["page"])';
     pagename = '@(Request.QueryString["pagename"].IsEmpty() ? "" : Request.QueryString["pagename"])';
     BindDepartmentList('Dep_Select');
     GetFactoryArea();
     GetHiddenTroubleType();
     GetHiddenTroubleEditDetail(FormId);
     GetHiddenTroubleLevelList();
     GetSourceList();
     GetReviewList(FormId);

     Loading = false;


     ">
    <form class="mui-input-group">
        <div class="mui-input-row">
            <label>园区</label>
            <select ng-model="HiddenTroubleEditModel.FactoryAreaId" disabled>
                <option value="">请选择园区</option>
                <option ng-repeat="x in FactoryArea" value="{{x.Id}}">{{x.ParkName}}</option>
            </select>
        </div>
        <div class="mui-input-row">
            <label>场所</label>
            <select ng-model="HiddenTroubleEditModel.PlaceId" disabled>
                <option value="">请选择场所</option>
                <option ng-repeat="x in PlaceList" value="{{x.Id}}">{{x.PlaceName}}</option>
            </select>
        </div>
        <div class="mui-input-row">
            <label>位置</label>
            <input type="text" placeholder="地点/部位" ng-model="HiddenTroubleEditModel.Location" disabled />
        </div>
        <div class="mui-input-row">
            <label>责任部门</label>
            <select id="Dep_Select" ng-model="HiddenTroubleEditModel.DepartmentId" disabled>
            </select>
        </div>
        <div class="mui-input-row">
            <label>责任人</label>
            <select ng-model="HiddenTroubleEditModel.ResponsibleEmloyeeNo" class="form-control" disabled>
                <option value="">请选择责任人</option>
                <option ng-repeat="x in EmployeeList" value="{{x.EmployeeNo}}">{{x.EmployeeNo}}-{{x.EmployeeName}}</option>
            </select>
        </div>
        <div class="mui-input-row">
            <label>来源</label>
            <select ng-model="HiddenTroubleEditModel.SourceId" ng-change="" class="form-control" disabled>
                <option value="">请选择来源</option>
                <option ng-repeat="x in SourceList" value="{{x.Id}}">{{x.Source}}</option>
            </select>
        </div>
        <div class="mui-input-row">
            <label>问题分类</label>
            <select ng-model="HiddenTroubleEditModel.CategoryAreaId" ng-change="GetHiddenTroubleTypeChild(HiddenTroubleEditModel.CategoryAreaId,'div_typeselect');" class="form-control" disabled>
                <option value="">请选择问题分类</option>
                <option ng-repeat="x in CategoryList" value="{{x.Id}}">{{x.TypeName}}</option>
            </select>
        </div>
        <div class="mui-input-row">
            <label>问题子类</label>
            <select ng-model="HiddenTroubleEditModel.TypeId" class="form-control" disabled>
                <option value="">请选择问题子类</option>
                <option ng-repeat="x in CategoryChildList" value="{{x.Id}}">{{x.TypeName}}</option>
            </select>
        </div>
        <div class="mui-input-row">
            <label>检查日期</label>
            <input type="text" ng-model="HiddenTroubleEditModel.CheckTime" readonly>
        </div>
        <div class="mui-input-row">
            <label>登记人</label>
            <input type="text" ng-model="HiddenTroubleEditModel.CreateUserName" readonly>
        </div>

    </form>
    <h5>问题描述：</h5>
    <div class="mui-input-row" style="margin: 10px 5px;">
        <textarea id="textarea" rows="5" ng-model="HiddenTroubleEditModel.Description" disabled></textarea>
    </div>
    <h5>整改要求：</h5>
    <div class="mui-input-row" style="margin: 10px 5px;">
        <textarea id="textarea" rows="5" ng-model="HiddenTroubleEditModel.Requirement" disabled></textarea>
    </div>
    <h5>问题照片</h5>
    <div class="row image-list" style="margin-top:20px;margin-bottom:50px;">
        <img class="image-item space" style="display:inline-block;margin-left:10px;" ng-src="{{x.FilePath}}" width="50" data-preview-src="" data-preview-group="1" ng-repeat="x in HiddenTroubleEditModel.FileList" />
    </div>

    <div ng-repeat="s in HiddenTroubleEditModel.SolutionList">
        <h5>整改措施：{{$index+1}}</h5>
        <form class="mui-input-group">
            <div class="mui-input-row mui-radio mui-left">
                <label>立即整改</label>
                <input name="radio1" type="radio" disabled ng-checked="!s.IsTemporary">
            </div>
            <div class="mui-input-row mui-radio mui-left">
                <label>临时措施</label>
                <input name="radio1" type="radio" disabled ng-checked="s.IsTemporary">
            </div>
        </form>
        <form class="mui-input-group" style="margin-top:10px;">
            <div class="mui-input-row">
                <label>计划完成时间</label>
                <input type="text" ng-model="s.PlanCompleteTime|JSONDate:'yyyy-MM-dd'" readonly />
            </div>
            <div class="mui-input-row">
                <label>联系部门</label>
                <input type="text" ng-model="s.DepartmentName" readonly />
            </div>
            <div class="mui-input-row">
                <label>联系人</label>
                <input type="text" ng-model="s.Responsible" readonly />
            </div>
        </form>
        <div class="mui-input-row" style="margin: 10px 5px;">
            <textarea id="textarea" rows="5" disabled ng-model="s.SolutionContent"></textarea>
        </div>
        <p>图片附件</p>
        <div class="row image-list" style="margin-top:20px;margin-bottom:50px;">
            <img class="image-item space" style="display:inline-block;margin-left:10px;" ng-src="{{x.FilePath}}" width="50" data-preview-src="" data-preview-group="2" ng-repeat="x in s.FileList" />
        </div>

        <h5>整改记录：</h5>
        <form class="mui-input-group" style="margin-top:10px;" ng-repeat="x in s.RectificationRecordList">
            <div class="mui-input-row">
                <label>整改时间</label>
                <input type="text" ng-model="x.OperateTime|JSONDate:'yyyy-MM-dd'" readonly />
            </div>
            <div class="mui-input-row">
                <label>整改描述</label>
                <input type="text" ng-model="x.Description" placeholder="" readonly />
            </div>
            <div class="mui-input-row">
                <label>登记人</label>
                <input type="text" ng-model="x.EmployeeName" placeholder="" readonly />
            </div>
            <p>图片附件</p>
            <div class="row image-list" style="margin-top:20px;margin-bottom:50px;">
                <img class="image-item space" style="display:inline-block;margin-left:10px;" ng-src="{{y.FilePath}}" width="50" data-preview-src="" data-preview-group="3" ng-repeat="y in x.FileList" />
            </div>
        </form>
        <div style="height:80px;"></div>
    </div>

    <div ng-repeat="x in ReviewList">
        <h5>复查记录：{{$index+1}}</h5>
        <form class="mui-input-group">
            <div class="mui-input-row">
                <label>复查时间</label>
                <input type="text" ng-model="x.ReviewTime|JSONDate:'yyyy-MM-dd'" readonly />
            </div>
            <div class="mui-input-row">
                <label>复查人</label>
                <input type="text" ng-model="x.CreateUserName" readonly />
            </div>
            <div class="mui-input-row">
                <label>复查结果</label>
                <input ng-if="x.IsComplete" type="text" value="通过" readonly />
                <input ng-if="!x.IsComplete" type="text" value="驳回" readonly />
            </div>
            <div class="mui-input-row">
                <label>复查描述</label>
                <input type="text" ng-model="x.Description" readonly />
            </div>
        </form>
        <h5>
             复查图片
        </h5>
        <div class="row image-list" style="margin-top:20px;margin-bottom:50px;">
            <img class="image-item space" style="display:inline-block;margin-left:10px;" ng-src="{{y.FilePath}}" width="50" data-preview-src="" data-preview-group="3" ng-repeat="y in x.FileList" />
        </div>
    </div>
  

</div>
        @section js{
            <script src="~/Assets/js/libs/upload.js"></script>
            <script src="~/Assets/js/mui.zoom.js"></script>
            <script src="~/Assets/js/mui.previewimage.js"></script>
            <script src="~/Assets/js/pg/MHiddenTrouble.js?v=@DateTime.Now.ToString("yyyyMMddHH")"></script>
            <script>

                mui.showLoading("正在加载..", "div");

                setTimeout(function () {
                    mui.hideLoading();
                    mui.previewImage();
                }, 2000);
            </script>
        }


